<div id="primary">
	<nav role="navigation" class="site-navigation page-navigation">
			<h1 class="assistive-text"><?php _e( 'Menu', 'tsv-bierden' ); ?></h1>
			<div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'tsv-bierden' ); ?>"><?php _e( 'Skip to content', 'tsv-bierden' ); ?></a></div>

			<?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?>
	</nav>
	<?php get_sidebar('Sidebar'); ?>
</div> <!-- #primary -->
<div id="secondary">
	<div id="content" role="main">
		<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
			<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
				<?php
					$post_id = get_the_ID();
				?>
				
				<header class="entry-header">
					<h1 class="entry-title"><?php the_title(); ?></h1>
				<?php if ( ( has_post_thumbnail( $post_id ) || '' != get_post_meta( $post_id, 'Thumbnail', true ) ) ) { ?>
					<div class="post-thumbnail">
					<?php
						if ( has_post_thumbnail( $post_id ) ) the_post_thumbnail( 'full' );
						else printf( '<img src="%1$s" alt="%2$s" />', esc_url( get_post_meta( $post_id, 'Thumbnail', true ) ), the_title_attribute( array( 'echo' => 0 ) ) );
					?>
					</div> 	<!-- end .post-thumbnail -->
				<?php } ?>
				</header> <!-- .entry-header -->		
				<div class="entry-content">
					<?php the_content(); ?>
				</div> <!-- .entry-content -->
				<footer class="entry-meta">
					<?php wp_link_pages( array('before' => '<p><strong>' . esc_attr__('Pages','tsv-bierden') . ':</strong> ', 'after' => '</p>', 'next_or_number' => 'number') ); ?>
					<?php edit_post_link( __('Edit this page', 'tsv-bierden') ); ?>
				</footer> <!-- .entry-meta -->
			</article> <!-- end .entry-content -->
		
		<?php endwhile; // end of the loop. ?>
	</div>	<!-- #content -->
</div> <!-- #secondary -->